-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hook up metadata filter on the_preview #40
base: main
Are you sure you want to change the base?
Conversation
Hi @mboynes - thanks for the PR and apologies for the long delay reviewing. I am finally getting to responding now. Do you have a description of steps to reproduce/how you tested this? |
related: #37 |
Hey @adamsilverstein, no worries on the delay! Thanks for looking it over. At the time, I tested it by making meta changes to an article, previewing that article, and confirming that my changes had been made. I haven't tried it since, so especially with the introduction of Gutenberg, I can't say for certain that this still works. Though I'd be surprised if it didn't. I hadn't noticed #37 at the time, this accomplishes the same task. I would offer that, assuming it still works, this PR may be moderately more performant, since it's not checking Let me know if I can be of any further help! |
Good point, this is a better approach. Going to do some testing in 4.9/classic and 5.2/GB to verify functionality. Thanks again for the PR @mboynes! |
Awesome PR @mboynes! I borrowed some of this preview code for a project and it works great with one little change for me. This might have just been my environment, but the following condition was not evaluating to true for me:
Instead, the post_type value was 'page'. This might have been because the So I think we might want to change:
to:
so it queries the revision post rather than the parent post? That seemed to solve the issue for me, and this PR worked wonders. Let me know if you want me to make a PR into your existing PR! 😄 |
@toddmilliken that improvement sounds helpful, I hope to get back to working on this again soon :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tested this and it works as expected once the conflict is fixed.
@grappler thanks for confirming, still on my radar to test this. |
Resolves #30. Needs testing.